﻿<UserControl x:Class="BaseControls.Clock"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="152" Height="199">
    <UserControl.Resources>
        <Storyboard x:Name="RedClockShow">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="redImage" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:01.5" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>        
        <Storyboard x:Name="Alarm">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="clock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.0500000" Value="-12.784"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.1500000" Value="10.655"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>    
    </UserControl.Resources>
    <Canvas x:Name="LayoutRoot">    
        <Image x:Name="image" Height="197" Width="153" Source="/BaseControls;Component/Images/ZegarTlo.png" Stretch="Fill" Canvas.Left="-1" Canvas.Top="1"/>
        <Image x:Name="redImage" Opacity="0" Height="197" Width="153" Source="/BaseControls;Component/Images/ZegarekTarczaCzerwona.png" Stretch="Fill" Canvas.Left="-6" Canvas.Top="2"/>
        <Image x:Name="Wsk" Height="28" Width="9" Canvas.Top="75" Canvas.Left="66" RenderTransformOrigin="0.519,1.143" Source="/BaseControls;Component/Images/Wskazowka.png" Stretch="Fill">
            <Image.RenderTransform>
                <RotateTransform />
            </Image.RenderTransform>
        </Image>
    </Canvas>
</UserControl>
